]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
slider: Use the sprite of the touch event, not the pointer
authorDaniel van Vugt <daniel.van.vugt@canonical.com>
Tue, 23 Sep 2025 06:12:56 +0000 (14:12 +0800)
committerDaniel van Vugt <daniel.van.vugt@canonical.com>
Tue, 23 Sep 2025 06:18:54 +0000 (14:18 +0800)
startDragging() starts with:

  const sprite = backend.get_sprite(global.stage, event);
  this._sprite = sprite;

but then vfunc_touch_event() would only compare this._sprite to:

  sprite = backend.get_pointer_sprite(global.stage);

which never matched. And so _endDragging() was never called and
the grab was never dismissed, effectively freezing the shell.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8660
Fixes: c206ec693 ("slider: Use Clutter.Sprite for pointing focus accounting")
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3887>

js/ui/slider.js

index 2cf5f145b44af2d7b07c53d2f6a5dc9448426a93..05861b56f69579fb4e189dcc1a154c0ddeb0e588 100644 (file)
@@ -132,7 +132,7 @@ export const Slider = GObject.registerClass({
 
     vfunc_touch_event(event) {
         const backend = global.stage.get_context().get_backend();
-        const sprite = backend.get_pointer_sprite(global.stage);
+        const sprite = backend.get_sprite(global.stage, event);
 
         if (!this._dragging &&
             event.type() === Clutter.EventType.TOUCH_BEGIN) {